project(1.12-shared-memory)

enable_language(CUDA)#激活CUDA语言支持，使用第一个写法时要进行注释

set(BASE_PATH /media/chyang/data/third_party/linux)
set(CUDA_HOME ${BASE_PATH}/cuda/cuda_12.3)
set(TRT_HOME ${BASE_PATH}/tensorrt/TensorRT-8.6.1.6/)

# Find CUDA.
include_directories(${CUDA_HOME}/include)
link_directories(${CUDA_HOME}/lib)

# Find TensorRT
include_directories(${TRT_HOME}/include/)
link_directories(${TRT_HOME}/lib)

add_executable(1.12-shared-memory src/main.cpp src/shared-memory.cu)
target_link_libraries(1.12-shared-memory PUBLIC cuda cudart nvinfer nvinfer_plugin nvonnxparser)